1. Field of the Invention
The present invention relates to a numerical control system, and in particular, relates to a numerical control system capable of maintaining synchronization accuracy in synchronous control between numerical controllers.
2. Description of the Related Art
If, in a machine in which many axes need to be synchronized such as a printing machine, the number of axes to be synchronized is not sufficient for the number of control axes of one numerical controller, two or more numerical controllers are connected by a communication path and axes to be controlled of each numerical controller are synchronized. When synchronous control of a plurality of numerical controllers is performed in such a synchronous control system, axes in a synchronous relationship are each set as a master axis and a slave axis, a numerical controller to control an axis to be a master axis is called a master unit, a numerical controller to control an axis to be a slave axis is called a slave unit, and the master unit and the slave unit are connected by a bus or a network. Then, the master unit transfers information for synchronization (synchronization information) to the slave unit in accordance with the control period to synchronize the slave axis with the master axis. On the other hand, the slave unit performs synchronous control of the slave axis based on synchronization information transferred from the master unit (FIG. 8).
Incidentally, each numerical controller has an individual clock and the time is clocked for each numerical controller. Thus, if clocks are not set among a plurality of numerical controllers for which the synchronous control is performed, the master unit and the slave unit have different time information and cannot correctly perform synchronous control. Therefore, it is necessary to perform synchronous control while correcting a lag of time information of the clock held by each numerical controller.
The lag of time information can be determined from a phase difference between the generation timing of a bus cycle generated in the slave unit in response to reception of transfer data from the master unit and the start timing of the control period of the slave unit. When axes controlled by the master unit and the slave unit are synchronized using the technology, information about control of the master axis is transferred from the master unit to the slave unit in predetermined timing in the control period and the slave unit can determine a lag of the clocks of the master unit and the slave unit from the received time to correct the information about control of the master axis and output a synchronization command to the slave axis based on the corrected axis information of the master axis (such as Japanese Patent Application Laid-Open No. 2007-89331).
If a transfer error occurs under the influence of, for example, noise in the data transfer for synchronization between the master unit and the slave unit, data is retransmitted, but if data is retransmitted, transfer data may not be transferred at regular intervals so that the time interval between the determined timing for the master unit to transfer and the reception of data by the slave unit increases. Then, the slave unit cannot detect a lag of the time information between the master unit and the slave unit and makes corrections based on the erroneous time information and therefore, the slave unit cannot correctly correct control information of the master axis and as a result, causes a synchronization error, posing a problem of inviting degradation of synchronization accuracy.